package cn.shengchao.examstar.knowledge.shared.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * 知识点掌握度分析数据传输对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MasteryAnalysisDTO {
    
    /**
     * 总掌握度百分比 (0-100)
     */
    private Double overallMasteryPercentage;
    
    /**
     * 总掌握度等级 (S-精通, A-掌握, B-理解, C-初步了解)
     */
    private String overallMasteryLevel;
    
    /**
     * 知识点总数
     */
    private Integer totalKnowledgePoints;
    
    /**
     * 已学习的知识点数量
     */
    private Integer learnedKnowledgePoints;
    
    /**
     * 最薄弱的知识点列表
     */
    private List<WeakKnowledgePoint> weakestPoints;
    
    /**
     * 掌握度分布 (掌握等级 -> 数量)
     * 例如: {"S": 5, "A": 10, "B": 15, "C": 20}
     */
    private Map<String, Integer> masteryDistribution;
    
    /**
     * AI分析的学习建议
     */
    private String learningRecommendation;
    
    /**
     * 学习计划ID
     */
    private Long studyPlanId;
    
    /**
     * 最薄弱的知识点子类
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class WeakKnowledgePoint {
        /**
         * 知识点ID
         */
        private Long id;
        
        /**
         * 知识点名称
         */
        private String name;
        
        /**
         * 掌握度百分比
         */
        private Double masteryPercentage;
        
        /**
         * 掌握度等级 (S-精通, A-掌握, B-理解, C-初步了解)
         */
        private String masteryLevel;
        
        /**
         * 学习次数
         */
        private Integer learningCount;
        
        /**
         * 学习时长(分钟)
         */
        private Integer studyTimeMinutes;
    }
} 